<template>
  <RbtBread />
</template>
<script setup lang="ts">
const slots = useSlots().default()
const dynamicItems: any[] = []
const RbtBread = () => {
  slots.forEach((item, i) => {
    dynamicItems.push(item)
    if (i < slots.length - 1) {
      dynamicItems.push(h('i', { class: 'iconfont icon-angle-right' }))
    }
  })
  return h('div', { class: 'rbt-bread' }, dynamicItems)
}
</script>

<style lang="scss">
.rbt-bread {
  display: flex;
  padding: 25px 10px;
  &-item {
    a {
      color: #666;
      transition: all 0.4s;
      &:hover {
        color: $rbtColor;
      }
    }
  }
  i {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
